Skip to content

Instantly share code, notes, and snippets.

<?php
// A blogroll for WordPress
// To be used with the link manager plugin https://wordpress.org/plugins/link-manager/
namespace Blogroll;
function custom_rewrite_rule() {
add_rewrite_rule('^.well-known/recommendations.opml/?$', 'index.php?well_known_recommendations=1', 'top');
}
@allenk
allenk / deepclean.cmd
Last active May 17, 2024 16:46
ASUS Software Clean Up Tool
@echo off
:: ------------------------------------------------------------------------------------------------------------
:: Clean Up ASUS All
:: ------------------------------------------------------------------------------------------------------------
:: The tool helps to clean up all ASUS software from system
:: ------------------------------------------------------------------------------------------------------------
:: Before running the tools,
:: 1. Complete backup your system.
:: 2. Disable ASUS Apps from BIOS (MyASUS and Armoury)
:: 3. Run ASUS remove tools (Armoury Crate Uninstall Tool.exe, or geek_uninstall.exe).
@Aiyualive
Aiyualive / game-7-window5-scores.txt
Created May 17, 2024 16:28
Scoring for Game 7 Window 5. 17/05 Fri 16:00 UTC - 16:10 UTC
Official Window 5
17/05 Fri 16:00 UTC - 16:10 UTC
Start Time: 16:00:04 UTC
Start Tx: 632L1xg86kdsZXfB6e42bLmudDFMZErh31ML3EwCruu6GDUcESA6EB53d5CHmLbFx7KEQVs2ZGYgJKdLdF1U2aA1
End time: 16:06:32 UTC
End Tx: 2qHd9nqgTsbyh4MSFwgZaffxFAGL2rr4pTA3jgTMNmhkc5yM5gXzJ1gjQAnj4w8DNZd8jmANvf2mFCMgsUBHVU4u
BAO scorings:
@mehmetalikaya-hub
mehmetalikaya-hub / rank.sql
Created June 22, 2021 09:25
RANK() functions in SQL
SELECT CustomerID,ShipVia,ShipAddress, ShippedDate,
RANK() OVER(ORDER BY ShippedDate DESC) AS SIRA
FROM Orders
@simonw
simonw / recover_source_code.md
Last active May 17, 2024 16:45
How to recover lost Python source code if it's still resident in-memory

How to recover lost Python source code if it's still resident in-memory

I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6

Attach a shell to the docker container

Install GDB (needed by pyrasite)

apt-get update && apt-get install gdb
@ishad0w
ishad0w / sources.list
Created April 30, 2020 16:55
Ubuntu 20.04 LTS (Focal Fossa) -- Full sources.list
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
@Sharpie
Sharpie / README.md
Last active May 17, 2024 16:42
Metric Scraping Scripts

This gist contains various scripts for scraping metrics. Mostly useful for processing the contents of Puppet Enterprise support bundles:

  • sar2influx.rb: A Ruby script that uses sadf to turn SAR archives into InfluxDB line format. For best results, run from a Linux VM using a recent operating system. Such as Ubuntu 22.04.
  • pdb2influx.sh: A bash script that uses awk and mlr to extract command processing times from puppetdb.log files.
  • top-api-calls.sh: Extracts the 10 most popular API calls from *-access.log along with their median and max duration grouped into 30 minute periods (Puppet $runinterval). Uses awk and mlr.